﻿using Nop.Core.Domain.Common;
using Nop.Core.Domain.WindAlert;

namespace Nop.Data.Mapping.WindAlert
{
    public partial class SpotsGroupMap : NopEntityTypeConfiguration<SpotsGroup>
    {
        public SpotsGroupMap()
        {
            this.ToTable("WSpotsGroup");

            this.HasKey(sg => sg.Id);
            this.Property(sg => sg.Name).HasMaxLength(400);

            this.HasMany(sg => sg.Spots)
                .WithMany()
                .Map(m => m.ToTable("WSpotsGroup_Spot_Mapping"));

            this.Ignore(sg => sg.AlertOption);

        }
    }
}